package com.billjc.activity.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class PlatsysDaoImpl implements PlatsysDao {

	@Autowired
	@Qualifier(value="platsysJdbcTemplate")
	private JdbcTemplate platsysJdbcTemplate;
	
	@Override
	public int updateAppStatus(String status,String id) {
		String sql = "update platformsys.CS_LIST set status = ? , UPDATETIME = ? where id = ? ";
		return platsysJdbcTemplate.update(sql, status,new Date(),id);
	}
	@Override
	public List<Map<String, Object>> selectAppType(String appNum) {
		String sql = "select s_source as AppType from platformsys.CS_LIST where id = ?";
		List<Map<String, Object>> list = platsysJdbcTemplate.queryForList(sql, appNum);
		return list;
	}

}
